package com.pda.common.pages.login;

import com.pda.common.basemvp.present.BasePresenter;
import com.pda.common.bean.LoginBean;
import java.util.List;

public class LoginPresent extends BasePresenter<LoginModel, LoginView> implements LoginModel.CallBack {

    public void login(final String phone,final String password) {
        view.showProgress();
        model.login(phone,password,this);
    }

    @Override
    public void onLoginSuccess(List<LoginBean.DataBean.ShowInfoBean> list) {
        if(view==null){
            return;
        }
        view.hideProgress();
        view.loginSuccess(list);
    }

    @Override
    public void onLoginFail(String str) {
        if(view==null){
            return;
        }
        view.hideProgress();
        view.loginFail(str);
    }
}


